package com.yuexunit.finance.statement.entity;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import com.yuexunit.finance.project.entity.lexicon.FinanceStateEnum;
import com.yuexunit.finance.project.entity.lexicon.ProductTypeEnum;


/**
 * @ClassName: DaysEarningEntity
 * @Description: TODO(这里用一句话描述这个类的作用)
 * @author kuangwj
 * @date 2017年12月05日 下午5:42:57
 */
@Entity
@Table(name = "FIN_DAYS_EARNING")
public class DaysEarningEntity {

	/** 日收益ID */
	@Id
	@GeneratedValue
	@Column(name = "DAYS_EARNING_ID")
	private Long daysEarningId;

	/** 收益编号 */
	@Column(name = "DAYS_EARNING_NUMBER")
	private String daysEarningNumber;

	/** 收益生成时间 */
	@Column(name = "EARNING_DATE")
	private Date earningDate;
	
	/** 放款日期 */
	@Column(name = "LOAN_DATE")
	private Integer loanDate;

	/** 融资id */
	@Column(name = "FINANCE_ID")
	private Long financeId;
	
	/** 融资编号 */
	@Column(name = "FINANCE_NUMBER")
	private String financeNumber;

	/** 企业id */
	@Column(name = "ENTERPRISE_ID")
	private Long enterpriseId;

	/** 企业名 */
	@Column(name = "ENTERPRISE_NAME")
	private String enterpriseName;

	/** 业务类型 */
	@Column(name = "PRODUCT_TYPE")
	private ProductTypeEnum productType;

	/** 还款方式 */
	@Column(name = "PAY_METHOD")
	private String payMethod;

	/** 费率 */
	@Column(name = "INTEREST_RATE")
	private BigDecimal interestRate;
	
	/** 总融资金额 */
	@Column(name = "FINANCE_AMOUNT")
	private BigDecimal financeAmount;

	/** 本金 */
	@Column(name = "BULKSTOCK_VALUATION")
	private BigDecimal bulkstockValuation;

	/** 服务费 */
	@Column(name = "INTEREST")
	private BigDecimal interest;

	/** 逾期费 */
	@Column(name = "LATE_FEE")
	private BigDecimal lateFee;
	
	/** 融资状态 */
	@Column(name = "FINANCE_STATE")
	private FinanceStateEnum financeState;

	/** 创建人 */
	@Column(name = "CREATOR")
	private String creator;

	/** 0-无效;1-有效','是否删除 */
	@Column(name = "ENABLED")
	private Boolean enabled;
	
	/** 服务费日期 */
	@Column(name = "INTEREST_DT")
	private Integer interestDate;

	/** 创建时间 */
	@Column(name = "CREATE_DT")
	private Date createDt;

	/** 更新时间 */
	@Column(name = "UPDATE_DT")
	private Date updateDt;

	public BigDecimal getFinanceAmount() {
		return financeAmount;
	}

	public void setFinanceAmount(BigDecimal financeAmount) {
		this.financeAmount = financeAmount;
	}

	public Integer getLoanDate() {
		return loanDate;
	}

	public void setLoanDate(Integer loanDate) {
		this.loanDate = loanDate;
	}

	public Integer getInterestDate() {
		return interestDate;
	}

	public void setInterestDate(Integer interestDate) {
		this.interestDate = interestDate;
	}

	public Long getDaysEarningId() {
		return daysEarningId;
	}

	public void setDaysEarningId(Long daysEarningId) {
		this.daysEarningId = daysEarningId;
	}

	public String getDaysEarningNumber() {
		return daysEarningNumber;
	}

	public void setDaysEarningNumber(String daysEarningNumber) {
		this.daysEarningNumber = daysEarningNumber;
	}

	public Date getEarningDate() {
		return earningDate;
	}

	public void setEarningDate(Date earningDate) {
		this.earningDate = earningDate;
	}

	public Long getFinanceId() {
		return financeId;
	}

	public void setFinanceId(Long financeId) {
		this.financeId = financeId;
	}

	public String getFinanceNumber() {
		return financeNumber;
	}

	public void setFinanceNumber(String financeNumber) {
		this.financeNumber = financeNumber;
	}

	public Long getEnterpriseId() {
		return enterpriseId;
	}

	public void setEnterpriseId(Long enterpriseId) {
		this.enterpriseId = enterpriseId;
	}

	public String getEnterpriseName() {
		return enterpriseName;
	}

	public void setEnterpriseName(String enterpriseName) {
		this.enterpriseName = enterpriseName;
	}
	
	public ProductTypeEnum getProductType() {
		if (productType == null) {
			return ProductTypeEnum.UNKNOWN;
		}
		return productType;
	}

	public void setProductType(ProductTypeEnum productType) {
		this.productType = productType;
	}

	public String getPayMethod() {
		return payMethod;
	}

	public void setPayMethod(String payMethod) {
		this.payMethod = payMethod;
	}

	public BigDecimal getInterestRate() {
		return interestRate;
	}

	public void setInterestRate(BigDecimal interestRate) {
		this.interestRate = interestRate;
	}

	public BigDecimal getBulkstockValuation() {
		return bulkstockValuation;
	}

	public void setBulkstockValuation(BigDecimal bulkstockValuation) {
		this.bulkstockValuation = bulkstockValuation;
	}

	public BigDecimal getInterest() {
		return interest;
	}

	public void setInterest(BigDecimal interest) {
		this.interest = interest;
	}

	public BigDecimal getLateFee() {
		return lateFee;
	}

	public void setLateFee(BigDecimal lateFee) {
		this.lateFee = lateFee;
	}

	public Boolean getEnabled() {
		return enabled;
	}

	public FinanceStateEnum getFinanceState() {
		return financeState;
	}

	public void setFinanceState(FinanceStateEnum financeState) {
		this.financeState = financeState;
	}

	public void setEnabled(Boolean enabled) {
		this.enabled = enabled;
	}
	
	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public Date getCreateDt() {
		return createDt;
	}

	public void setCreateDt(Date createDt) {
		this.createDt = createDt;
	}

	public Date getUpdateDt() {
		return updateDt;
	}

	public void setUpdateDt(Date updateDt) {
		this.updateDt = updateDt;
	}



	@Override
	public String toString() {
		return "DaysEarningEntity [daysEarningId=" + daysEarningId + ", daysEarningNumber=" + daysEarningNumber
				+ ", earningDate=" + earningDate + ", loanDate=" + loanDate + ", financeId=" + financeId
				+ ", financeNumber=" + financeNumber + ", enterpriseId=" + enterpriseId + ", enterpriseName="
				+ enterpriseName + ", productType=" + productType + ", payMethod=" + payMethod + ", interestRate="
				+ interestRate + ", financeAmount=" + financeAmount + ", bulkstockValuation=" + bulkstockValuation
				+ ", interest=" + interest + ", lateFee=" + lateFee + ", financeState=" + financeState + ", creator="
				+ creator + ", enabled=" + enabled + ", interestDate=" + interestDate + ", createDt="
				+ createDt + ", updateDt=" + updateDt + "]";
	}

	
}
